import 'package:flutter_demo/ui/pages/treasure/module/course_item.dart';
import 'package:flutter_demo/ui/pages/treasure/module/lt_scene_vos.dart';

class QueryHomePage {
  String? pageNo;
  String? totalPage;
  List<LtSceneVOS>? ltSceneVOS;
  List<CourseItem>? combatList;
  List<CourseItem>? courseList;

  QueryHomePage(
      {this.pageNo,
      this.totalPage,
      this.ltSceneVOS,
      this.combatList,
      this.courseList});

  QueryHomePage.fromJson(Map<String, dynamic> json) {
    pageNo = json['pageNo'];
    totalPage = json['totalPage'];
    if (json['ltSceneVOS'] != null) {
      ltSceneVOS = <LtSceneVOS>[];
      json['ltSceneVOS'].forEach((v) {
        ltSceneVOS!.add(new LtSceneVOS.fromJson(v));
      });
    }
    if (json['combatList'] != null) {
      combatList = <CourseItem>[];
      json['combatList'].forEach((v) {
        combatList!.add(new CourseItem.fromJson(v));
      });
    }
    if (json['courseList'] != null) {
      courseList = <CourseItem>[];
      json['courseList'].forEach((v) {
        courseList!.add(new CourseItem.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['pageNo'] = this.pageNo;
    data['totalPage'] = this.totalPage;
    if (this.ltSceneVOS != null) {
      data['ltSceneVOS'] = this.ltSceneVOS!.map((v) => v.toJson()).toList();
    }
    if (this.combatList != null) {
      data['combatList'] = this.combatList!.map((v) => v.toJson()).toList();
    }
    if (this.courseList != null) {
      data['courseList'] = this.courseList!.map((v) => v.toJson()).toList();
    }
    return data;
  }
}
